;***********************
;*    M.A.M.E. v202    *
;*   Einstein TC-01    *
;*   Script by .mad.   *
;*    November 2018  v2*
;***********************

; re-compiled version of Einstein MAME x64 v202.
; updated floppy drive emulation and Joystick support.
; * Use this for all .COM (1 file) and Protected disk loaders.
; (Drive reset/initialise is broken after loading 1 file.)
; XBAS [enter] (wait for BASIC to load), DIR or RUN"FILE" (!!Fails!!).
; Typing DIR or LOAD again, after the file error message, works.
; This error breaks Auto-Loading and many multi-file games in BASIC.
; Use MAME v191 to automate loading of all XBS files... with the GameBase disk set. ;)

;a few disks have copy protection (Theatre Europe), these do not work in MAME yet.
;*They do work on REAL machines.

;choose the machine and desired screen mode. (only Einstein in this MAME)
Add_CLP(einstein -window -skip_gameinfo)

;--------------------------------------------
; Available Floppy Drive options.
; default = 3ss (no option required)
;--------------------------------------------
; 35dd    = 3.5" double density
; 35ssdd  = 3.5" single-sided double density
; 3ds     = 3" double-sided
; 3ss     = TEAC FD-30A FDD
; 525qd   = 5.25" quad density
; 525ssqd = 5.25" single-sided quad density
;--------------------------------------------

If GameType CONTAINS(mfi)
	;MESS Floppy Image. change floppy drive hardware (5.25 Single Sided Quad Density).
	Add_CLP( -i042:0 525ssqd -i042:1 525ssqd)
End If

;--------------------------
; Hardware Expansion Slots.
;--------------------------
If Key_slot CONTAINS(speculator)
	;Not fully emulated yet!
	Add_CLP( -pipe speculator)
	
ElseIf Key_slot CONTAINS(speech)
	;requires "sp0256-al2.bin" in rom folder or MAME will crash.
	Add_CLP( -user speech)

ElseIf Key_slot CONTAINS(covox)
	Add_CLP( -centronics covox)

ElseIf Key_slot CONTAINS(stereo||cstereo)
	Add_CLP( -centronics covox_stereo)
End If

;----------------------
; Attach the game disk.
;----------------------
If Key_boot CONTAINS(yes)
	;Inset a boot disk in Drive:0 and the game disk in Drive:1.
	Add_CLP( -floppydisk1 "%dbpath%/scripts/boot.dsk" -floppydisk2 %gamepathfile%)

Else
	;Assumes 3" Xtal DSK edited for auto-loading.
	Add_CLP( -floppydisk1 %gamepathfile%)
End If

	Run_Emulator()


